﻿namespace Steamworks
{
    using System;
    using System.Runtime.InteropServices;

    [StructLayout(LayoutKind.Sequential)]
    public struct ManifestId_t : IEquatable<ManifestId_t>, IComparable<ManifestId_t>
    {
        public static readonly ManifestId_t Invalid;
        public ulong m_ManifestId;
        public ManifestId_t(ulong value)
        {
            this.m_ManifestId = value;
        }

        static ManifestId_t()
        {
            Invalid = new ManifestId_t(0L);
        }

        public override string ToString()
        {
            return this.m_ManifestId.ToString();
        }

        public override bool Equals(object other)
        {
            return ((other is ManifestId_t) && (this == ((ManifestId_t) other)));
        }

        public override int GetHashCode()
        {
            return this.m_ManifestId.GetHashCode();
        }

        public bool Equals(ManifestId_t other)
        {
            return (this.m_ManifestId == other.m_ManifestId);
        }

        public int CompareTo(ManifestId_t other)
        {
            return this.m_ManifestId.CompareTo(other.m_ManifestId);
        }

        public static bool operator ==(ManifestId_t x, ManifestId_t y)
        {
            return (x.m_ManifestId == y.m_ManifestId);
        }

        public static bool operator !=(ManifestId_t x, ManifestId_t y)
        {
            return !(x == y);
        }

        public static explicit operator ManifestId_t(ulong value)
        {
            return new ManifestId_t(value);
        }

        public static explicit operator ulong(ManifestId_t that)
        {
            return that.m_ManifestId;
        }
    }
}

